module.exports = {
  publicPath: './',
  outputDir: 'dist',
  assetsDir: 'static',
  productionSourceMap: true,
  lintOnSave: false,
  devServer: {
    port: 8080,
    open: true,
    host: '0.0.0.0',
    overlay: {
      warnings: false,
      errors: true
    },
    proxy: {
      'localhost:8081': {
        target: 'http://localhost:5000',
        changeOrigin: true,
        secure: false,
        onProxyReq: (proxyReq) => {
          proxyReq.setHeader('Access-Control-Allow-Origin', '*');
        }
      },
      '/query': {
        target: 'http://localhost:5000',
        changeOrigin: true,
        secure: false,
        onProxyReq: (proxyReq) => {
          proxyReq.setHeader('Access-Control-Allow-Origin', '*');
        }
      },
        '/api': {
        target: 'http://localhost:5000',
        changeOrigin: true,
        secure: false,
        onProxyReq: (proxyReq) => {
          proxyReq.setHeader('Access-Control-Allow-Origin', '*');
        }
      },

      '/get-knowledge-bases': {
        target: 'http://localhost:5000',
        changeOrigin: true,
        secure: false,
        onProxyReq: (proxyReq) => {
          proxyReq.setHeader('Access-Control-Allow-Origin', '*');
        }
      },
       '/query_with_files': {
        target: 'http://localhost:5000',
        changeOrigin: true,
        secure: false,
        onProxyReq: (proxyReq) => {
          proxyReq.setHeader('Access-Control-Allow-Origin', '*');
        }
      },
      // 其他API端点
    }
  },
  css: {
    extract: true,
    sourceMap: true,
    requireModuleExtension: true
  }
}